package com.example.springsecurity.auth.qq.connet;

import com.example.springsecurity.auth.qq.api.QQ;
import org.springframework.social.connect.support.OAuth2ConnectionFactory;

/**
 * 构建ConnectionFactory
 */
public class QQConnectionFactory extends OAuth2ConnectionFactory<QQ> {
    /**
     * 除了ServiceProvider和Adapter对象还需要一个providerId---》提供商的唯一标识
     *
     * @param providerId      qq的唯一标识
     */
    public QQConnectionFactory(String providerId, String appId, String appSecret) {
        super(providerId, new QQServiceProvider(appId,appSecret), new QQAdapter());
    }
}
